home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / utilit~1 / pstopls.zoo / top.doc < prev    next >
Encoding:
Text File  |  1991-11-04  |  5.5 KB  |  150 lines

  1. NAME
  2.     top - repeatedly display system status
  3.  
  4. SYNOPSYS
  5.     top [-i] [-s seconds] [-w width] [-n nlines] [-r]
  6.  
  7. DESCRIPTION
  8.  
  9. "Top" is a program displays a periodically-updated picture of what's going
  10. on in your system.
  11.  
  12. The display is a snapshot of system activity at periodic intervals. The top
  13. line of the display shows the number of milliseconds included in the
  14. interval, the percentage of that time counted by MiNT as "idle," the number
  15. of processes in the system, the number of running processes, and the total
  16. number of bytes used (the sum of the memory sizes of the processes listed).
  17.  
  18. Below that each process in the system is listed, one process per line.
  19. The fields of this line have the following meanings:
  20.  
  21.     PID    The process ID of this process.
  22.  
  23.     PPID    The process ID of the parent of this process.
  24.  
  25.     PRI    The process' base priority.
  26.  
  27.     CUR    The process' current priority for adaptive scheduling.
  28.  
  29.     STATUS    The run state of the process: Wait, Sleep, Run, Exit,
  30.         TSR, and Stop.  The Exit state means this process has
  31.         terminated, but its parent has not received its exit code. 
  32.         The Run state includes the Ready state.
  33.  
  34.     SIZE    The amount of memory allocated to this process.
  35.  
  36.     TIME    The amount of time this process has run.  This is the sum
  37.         of the user and system times of the process, displayed as
  38.         MM:SS.FF (minutes, seconds, and fraction of a second) or
  39.         HH:MM:SS (hours, minutes, and seconds) if the process has
  40.         run one hour or more.
  41.  
  42.     %    The percentage of the time in this interval that this
  43.         process accounted for.
  44.  
  45.     COMMAND    The command this process is running.
  46.  
  47. The number of processes displayed is limited by the number of lines on
  48. your screen, or the 'nlines' option, whichever is less.
  49.  
  50. Either the PPID or the PRI and CURPRI will be displayed, not both.  Toggle
  51. between these with the 'p' command (see below).
  52.  
  53. OPTIONS
  54.  
  55.     -n nlines
  56.         Set the maximum number of processes to display.  This
  57.         defaults to the length of your screen minus three for
  58.         the status, input, and header lines.
  59.  
  60.     -r    Sort processes in DECREASING order of PID.  This (generally)
  61.         puts more recent processes at the top.
  62.  
  63.     -s sleep
  64.         Set the interval between updates to 'sleep' seconds.
  65.         Default is 5.
  66.  
  67.     -w width
  68.         Set the maximum width of a line to 'width'.  The arguments
  69.         in the COMMAND field will be truncated so the line is no
  70.         more than 'width' characters long.  The rest of the display
  71.         (PID, STATUS, etc.) is not affected.  Default is the width
  72.         of your screen.
  73.  
  74.  
  75. COMMANDS WHILE RUNNING
  76.  
  77.     ?    Help - a brief reminder of what commands are available.
  78.  
  79.     k    Kill.  Prompts for arguments to the "kill" command, which
  80.         are PID's preceded by an optional signal number. "123 124"
  81.         sends signal 15 (SIGTERM) to processes 123 and 124. "-1 123
  82.         124" sends signal 1 (SIGHUP) to them instead.
  83.  
  84.     n    Prompts for the maximum number of processes to display
  85.         (nlines). This can be smaller than your screen size, but
  86.         not  larger.
  87.  
  88.     p    Toggle between displaying the PPID of each process and that
  89.         process' PRI and CURPRI values.
  90.  
  91.     q    Quit.
  92.  
  93.     r    Renice.  In response to the prompt, you should type in a
  94.         "nice" delta value and one or more PID's.  Those process'
  95.         "nice" values will be changed by that delta.
  96.  
  97.     s    Prompt for the number of seconds between intervals.
  98.  
  99.     w    Prompt for the width; the width can be more than the screen
  100.         width, in which case long argument lists will take up
  101.         multiple lines.
  102.  
  103.     ^L    (control-L) clear and repaint the display.
  104.  
  105. NOTES
  106.  
  107. This program uses curses and termcap.  Appropriate environment variables
  108. must be set up.  The screen width and height, and thus the wraparound point
  109. for wide lines and the maximum number of processes to display, are set at
  110. startup time.
  111.  
  112. The "snapshot of your system" really is a snapshot: if things are moving
  113. too fast, you can get blur.  If a process appears, runs, and exits during a
  114. single interval, top will never see it.  Also, another strange-looking
  115. thing can happen.  Let's say you know that process "A" will run, and after
  116. it exits process "B" will run.  They may both appear on the same listing. 
  117. Finally, the sum of the percentages might be greater than 100.  All this is
  118. caused by strobe, roundoff, and nonzero shutter time effects.
  119.  
  120. MiNT NOTES
  121.  
  122. The Run state includes the Ready state: since top itself is always the
  123. running process when it gets a chance to check, having a separate name for
  124. it conveys no information and is distracting.  So multiple processes
  125. appear to be "running."
  126.  
  127. The COMMAND field is the concatenation of the "name" field of the process
  128. and the command-line arguments in the process' basepage.  It can be wildly
  129. inaccurate if the process is using its basepage as its DTA for a directory
  130. search, or some other reason.
  131.  
  132. Processes are shown in the order they arrived from the directory search. If
  133. there are more processes than lines on your screen (or your nlines value),
  134. you'll see the older, less-interesting ones and lose the newer-more
  135. interesting ones off the bottom.  That's why you can reverse the search
  136. order.
  137.  
  138. AUTHOR
  139.  
  140. Top for MiNT was written in August, 1991 by Allan Pratt, Atari Corp.
  141. (atari!apratt).  The idea for top came from the program of that name for
  142. BSD UNIX systems. (UNIX is a trademark of AT&T.)  The source code is a
  143. hacked-over version of ps, written in March of 1991 by Tony Reynolds
  144. (cctony@sgisci1.ocis.olemiss.edu) and modified by Eric Smith (Mr. MiNT
  145. himself).
  146.  
  147. TOP is placed unsupported in the public domain by Allan Pratt without let
  148. or hindrance.  Please make the program and the source freely available.
  149. Share and enjoy.
  150.